package com.lhy.consumeropenfeign;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.client.RestTemplate;

import java.util.concurrent.TimeUnit;

@SpringBootApplication
@EnableFeignClients
public class ConsumerOpenFeignApplication {

    public static void main(String[] args) throws InterruptedException {
        ConfigurableApplicationContext configurableApplicationContext = SpringApplication.run(ConsumerOpenFeignApplication.class, args);
//        while (true){
//            //端口号更改只有启动的时候有用
//            String username=configurableApplicationContext.getEnvironment().getProperty("server.port");
//            System.out.println(username);
//            TimeUnit.SECONDS.sleep(1);
//        }
    }

}
